﻿#pragma once

#include "Math/IntPoint.h"
#include "Input/WindowEventType.h"

struct WHENGINE_API SWindowEvent
{
    uint64_t WindowID;

    uint64_t GetWindowID() const;

    EWindowEventType GetType() const
    {
        return Type;
    }

    //only valid for resize event
    SIntPoint GetWindowSize() const;

    //只有在失去焦点事件中有效
    //返回获得焦点的窗口ID,如果没有获得焦点的窗口返回0
    uint64_t GetFocusedWindowID() const;

protected:
    EWindowEventType Type=EWindowEventType::Unknow;
    SIntPoint WindowSize;
    uint64_t AnotherWindowID=0;

#ifdef LINUX
    friend class CLinuxPlatform;
#endif

#ifdef WIN32
    friend class CWindowsProcedure;
#endif

    friend class RApplication;

};

